package com.leo.blog.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.leo.blog.entity.HeadLine;

public interface HeadLineDao {
	/**
	 * 添加头条
	 * @param headLine
	 * @return
	 */
	int insertHeadLine(HeadLine headLine);
	
	/**
	 * 根据id查询头条
	 * @param headLineId
	 * @return
	 */
	HeadLine queryHeadLineById(int headLineId);
	
	/**
	 * 更新头条
	 * @param headLine
	 * @return
	 */
	int updateHeadLine(HeadLine headLine);
	
	/**
	 * 根据id删除头条
	 * @param headLineId
	 * @return
	 */
	int deleteHeadLineById(int headLineId);
	
	/**
	 * 根据条件分页查询头条列表信息
	 * @param headLineCondition
	 * @param rowIndex
	 * @param pageSize
	 * @return
	 */
	List<HeadLine> queryHeadLineListByPage(@Param("headLineCondition") HeadLine headLineCondition, 
				@Param("rowIndex") int rowIndex, @Param("pageSize") int pageSize);
	int queryHeadLineListByPageCount(@Param("headLineCondition") HeadLine headLineCondition);
}
